package controller

import (
	"fmt"
	"net/http"
	"text/template"

	"gitee.com/shuwenhe/shuwen-go/update/dao"
	"gitee.com/shuwenhe/shuwen-go/update/model"
)

func GetItemByID(w http.ResponseWriter, r *http.Request) {
	t := template.Must(template.ParseFiles("views/pages/manager/item_modify.html"))
	item, _ := dao.GetItemByID(59)
	fmt.Println("item = ", item)
	t.Execute(w, item)
}

func UpdateItem(w http.ResponseWriter, r *http.Request) {
	item := &model.Item{}
	dao.UpdateItem(item)
}
